package org.example.yuaiagent.common;

import lombok.Data;

@Data
public class Result {
    private Integer code;
    private String message;
    private Object data;
    private Result() {
    }
    public static Result ok(String message, Object data) {
        Result result = new Result();
        result.setCode(200);
        result.setMessage(message);
        result.setData(data);
        return result;
    }

    public static Result fail(String message, Object data) {
        Result result = new Result();
        result.setCode(300);
        result.setMessage(message);
        result.setData(data);
        return result;
    }

}
